﻿using System.ComponentModel;
using System.Windows;

namespace HCI.Questionaire.Entities
{
    public class Answer : INotifyPropertyChanged
    {
        #region Feild
        private bool m_IsAnswered;
        private object m_AnswerResult;
        private string m_AnswerText;
        #endregion

        #region Property 
        public bool IsAnswered
        {
            get
            {
                return m_IsAnswered;
            }
            set
            {
                m_IsAnswered = value;
                OnPropertyChanged("IsAnswered");
            }
        }

        public string AnswerText
        {
            get
            {
                return m_AnswerText;
            }
            set
            {
                m_AnswerText = value;
                OnPropertyChanged("AnswerText");
            }
        }

        public object AnswerResult
        {
            get
            {
                return m_AnswerResult;
            }
            set
            {
                m_AnswerResult = value;
                OnPropertyChanged("AnswerResult");
            }
        }
        #endregion

        #region Method: Private
        protected void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }

        }
        #endregion

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion
    }
}